from pathlib import Path

from flask import Flask, send_file, render_template

app = Flask(__name__)


# 首页：文字星星跳动+音乐感动画
@app.route('/', methods=['GET', 'POST'])
def index():
    return render_template(Path("index.html"))


# 图片路由
@app.route('/msg.jpg', methods=['GET', 'POST'])
def show_image():
    return send_file('护眼.jpg', mimetype='image/jpeg')


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8088, debug=True)